<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="../mall/image/迪.png"rel="shortcut icon"type="image/x-icon">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="../../static/admin/layui/css/font.css">

    <link rel="stylesheet" href="../../static/admin/layui/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="../../static/admin/layui/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../static/admin/layui/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
       
          <input type="text" name="username"  placeholder="请输入用户名" autocomplete="off" class="layui-input">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
   
      
      <table class="layui-hide" id="test"></table>

    </div>
    <script type="text/html" id="functionBtns">
      <a class="layui-btn layui-btn-small" onclick="xiugai(this)">修改</a>   
  
   </script>
    <script>
        layui.use('table', function(){
          var table = layui.table;
          table.render({
            elem: '#test'
            ,url: 'http://127.0.0.1:8088/api/getDelStudents'
            ,cols: [[
              {field:'id', width:80, title: 'ID',}
              ,{field:'name', width:200, title: '姓名'}
              ,{field:'sex', width:200, title: '性别', }
              ,{field:'age', width:200, title: '年龄'}
              ,{field:'status', title: '状态', width: 200}
              ,{ width:200, title: '操作',toolbar:"#functionBtns" }
            ]]
            ,page: true
            ,limit:10
            ,limits:[10,20,30,40,50]
            , done: function(res, curr, count){
                $("[data-field='status']").children().each(function(){
                  if($(this).text()=='0'){
                      $(this).text("正常")
                  }else if($(this).text()=='1'){
                      $(this).text("请假")
                  }else if($(this).text()=='2'){
                      $(this).text("休学")
                  }else if($(this).text()=='3'){
                      $(this).text("退学")
                  }else if($(this).text()=='4'){
                      $(this).text("开除")
                  }
                });
              }
          });
      });

      function  xiugai(that){
          x_admin_show('修改信息','./member-edit.html',600,400);
      }

    </script>
    
  </body>

</html>